<template>
  <div class="scroll-top">
    <i class="iconfont icon-roundleftfill" @click.prevent.stop="scrollToTop"></i>
  </div>
</template>

<script type="text/ecmascript-6">
export default {
  name: 'scroll-top',
  methods: {
    scrollToTop () {
      console.log('scrollToTop')
      window.scrollTo(0, 1)
    }
  }
}
</script>

<style lang="stylus" rel="stylesheet/stylus" scoped>
.scroll-top
  border-radius: 50%
  transform: rotate(90deg)
  .icon-roundleftfill
    font-size: 34px
    color: #A9A9A9
    opacity: .5
</style>
